$OpenBSD: patch-Makefile_in,v 1.3 2011/10/30 07:38:50 sebastia Exp $
Also install some demos and license files.
--- Makefile.in.orig	Wed Jun  1 22:16:09 2011
+++ Makefile.in	Sun Oct  9 18:18:26 2011
@@ -75,6 +75,7 @@ datadir		= @datadir@
 datarootdir     = @datarootdir@
 mandir		= @mandir@
 includedir	= @includedir@
+docdir		= @docdir@
 
 DESTDIR		=
 
@@ -190,7 +191,7 @@ doc-x:
 doc:
 	@echo "No docs to build"
 
-install: all install-binaries install-libraries install-doc
+install: all install-binaries install-libraries install-doc install-demos
 
 install-binaries: binaries install-lib-binaries install-bin-binaries
 	@mkdir -p $(DESTDIR)$(pkglibdir)
@@ -219,13 +220,21 @@ install-doc-x:
 	@echo "Installing documentation in $(DESTDIR)$(mandir)"
 	@for i in $(srcdir)/doc/*.n; do \
 	    echo "Installing $$i"; \
-	    rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \
 	    $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \
 	done
 
 install-doc: install-doc-x
-	mkdir -p $(DESTDIR)$(pkglibdir)/htmldoc
-	cp $(srcdir)/doc/*.html $(DESTDIR)$(pkglibdir)/htmldoc
+	@echo "Installing documentation in $(DESTDIR)$(docdir)"
+	mkdir -p $(DESTDIR)$(docdir)
+	$(INSTALL_DATA) $(srcdir)/doc/*.html $(DESTDIR)$(docdir)
+	$(INSTALL_DATA) $(srcdir)/license.terms $(DESTDIR)$(docdir)
+
+install-demos:
+	mkdir -p $(DESTDIR)$(pkgdatadir)
+	$(INSTALL_DATA) $(srcdir)/demos/*.tcl $(DESTDIR)$(pkgdatadir)
+	chmod 555 $(DESTDIR)$(pkgdatadir)/demo.tcl
+	mkdir -p $(DESTDIR)$(pkgdatadir)/pics
+	$(INSTALL_DATA) $(srcdir)/demos/pics/* $(DESTDIR)$(pkgdatadir)/pics
 
 test: binaries libraries
 	@$(WISH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) | cat
